<template>
    <van-nav-bar>
        <template #left v-if="isLeft">
            <van-icon name="arrow-left" @click="leftBack"/>
        </template>
        <template #title>
            {{title}}
        </template>
        <template #right>
            <van-icon name="wap-nav" />
        </template>
    </van-nav-bar>
</template>

<script>
    import { Toast } from 'vant';
    export default {
        name:"hd",
        data() {
            return {
            }
        },
        props:[
            'left',
            'titles'
        ],
        created() {
            // console.log(typeof this.left);
        },
        computed:{
            isLeft: function() {
                return this.left == undefined ? true : false
            },
            title: function() {
                return this.titles;
            } 
        },
        methods: {
            leftBack : function(){
                this.$router.go(-1);
            }
        },
    }
</script>

<style scoped>
    #reset /deep/ .van-ellipsis{
		color: red !important;
	}
</style>